/*-----------------------------------------------------------------------------------*/
/*	Begin
/*-----------------------------------------------------------------------------------*/


jQuery(document).ready(function() {

"use strict";

/*-----------------------------------------------------------------------------------*/
/*	Superfish
/*-----------------------------------------------------------------------------------*/

	jQuery('ul.top-menu-left').superfish({
		delay: 200,
		speed: 'fast',
		autoArrows: true,
		dropShadows: false,
		disableHI: true
	});

	jQuery('ul.top-menu-right').superfish({
		delay: 200,
		speed: 'fast',
		autoArrows: false,
		dropShadows: false,
		disableHI: true
	});

/*-----------------------------------------------------------------------------------*/
/*	Tab Shortcode
/*-----------------------------------------------------------------------------------*/
  
	jQuery(".uxde-tabs").tabs();

/*-----------------------------------------------------------------------------------*/
/*	Toggles Shortcode
/*-----------------------------------------------------------------------------------*/
	
	jQuery(".uxde-toggle").each( function () {
		if(jQuery(this).attr('data-id') === 'closed') {
			jQuery(this).accordion({ header: '.uxde-toggle-title', collapsible: true, autoHeight: false, active: false  });
		} else {
			jQuery(this).accordion({ header: '.uxde-toggle-title', collapsible: true, autoHeight: false});
		}
	});

/*-----------------------------------------------------------------------------------*/
/*	FitVids
/*-----------------------------------------------------------------------------------*/

	jQuery(".body-content").fitVids();

/*-----------------------------------------------------------------------------------*/
/*	Back Top
/*-----------------------------------------------------------------------------------*/

	jQuery("#back-top").hide();
		jQuery(function () {
			jQuery(window).scroll(function () {
				if (jQuery(this).scrollTop() > 400) {
					jQuery('#back-top').fadeIn();
				} else {
					jQuery('#back-top').fadeOut();
				}
			});

			jQuery('#back-top').click(function () {
				jQuery('body,html').animate({
				scrollTop: 0
				}, 1000);
			return false;
		});
	}); 

/*-----------------------------------------------------------------------------------*/
/*	Tabbed Widget
/*-----------------------------------------------------------------------------------*/

	jQuery(".widget-tabs").tabs({ fx: { opacity: 'show' } });
	jQuery(".widget-tab li:last-child").addClass('last');
	
	jQuery(".widget-tabs").tabs({ 
		fx: { opacity: 'toggle' } 
	});
	
	jQuery(".toggle").each( function () {
		if(jQuery(this).attr('data-id') === 'closed') {
			jQuery(this).accordion({ header: 'h4', collapsible: true, active: false  });
		} else {
			jQuery(this).accordion({ header: 'h4', collapsible: true});
		}
	});

/*-----------------------------------------------------------------------------------*/
/*	The End
/*-----------------------------------------------------------------------------------*/	

});
